﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Printing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MDIApplication
{
    public partial class PrintReceipt : Form
    {
        public PrintReceipt()
        {
            InitializeComponent();
        }

        private void PrintReceipt_Load(object sender, EventArgs e)
        {
            //PrintDialog pDia = new PrintDialog();
            //pDia.ShowDialog();
        }

        private void btnprint_Click(object sender, EventArgs e)
        {
            PrintDialog printDia = new PrintDialog();
            PrintDocument printDoc = new PrintDocument();
            printDoc.DocumentName = "Print Document";
            printDia.Document = printDoc;
            printDia.AllowSelection = true;
            printDia.AllowSomePages = true;
            if (printDia.ShowDialog() == DialogResult.OK)
                printDoc.Print();
        }

        private void btnprintpre_Click(object sender, EventArgs e)
        {
            //printPreviewDialog1.Document = printDocument1;

            // Show PrintPreview Dialog
            //printPreviewDialog1.ShowDialog();
        }
    }
}
